import React, { useEffect } from 'react'
import Navbar from '@/comopnents/Navbar'
import ColectList from '@/comopnents/ColectList'
export default function Artilcolect() {
    let list = localStorage.getItem('artList') ? JSON.parse(localStorage.getItem('artList') as string) : null
    console.log(localStorage.getItem('artList'));
    if (list) {
        list.forEach((item: { pic: string, coverImg: string }) => {
            item.pic = item.coverImg
        });
    }

    return (
        <div>
            <Navbar title='乐居'></Navbar>
            {
                list ? <ColectList lists={list}></ColectList> : <>暂无数据</>
            }


        </div>
    )
}
